home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form LCDArray
- BorderStyle = 3 'Fixed Dialog
- Caption = "LCD Array"
- ClientHeight = 3975
- ClientLeft = 6555
- ClientTop = 345
- ClientWidth = 2895
- Height = 4380
- Icon = "LCDArray.frx":0000
- Left = 6495
- LinkTopic = "Form1"
- LockControls = -1 'True
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 3975
- ScaleWidth = 2895
- ShowInTaskbar = 0 'False
- Top = 0
- Width = 3015
- Begin VB.PictureBox picLCD
- Height = 375
- Index = 0
- Left = 780
- ScaleHeight = 315
- ScaleWidth = 1935
- TabIndex = 8
- Top = 360
- Width = 1995
- End
- Begin VB.Timer Timer1
- Interval = 500
- Left = 840
- Top = 720
- End
- Begin VB.PictureBox picLCD
- Height = 375
- Index = 4
- Left = 780
- ScaleHeight = 315
- ScaleWidth = 1935
- TabIndex = 3
- Top = 3480
- Width = 1995
- End
- Begin VB.PictureBox picLCD
- Height = 375
- Index = 3
- Left = 780
- ScaleHeight = 315
- ScaleWidth = 1935
- TabIndex = 2
- Top = 1920
- Width = 1995
- End
- Begin VB.PictureBox picLCD
- Height = 375
- Index = 2
- Left = 780
- ScaleHeight = 315
- ScaleWidth = 1935
- TabIndex = 1
- Top = 2700
- Width = 1995
- End
- Begin VB.PictureBox picLCD
- Height = 375
- Index = 1
- Left = 780
- ScaleHeight = 315
- ScaleWidth = 1935
- TabIndex = 0
- Top = 1140
- Width = 1995
- End
- Begin VB.Image Image1
- Height = 480
- Index = 4
- Left = 120
- Picture = "LCDArray.frx":000C
- Top = 3480
- Width = 480
- End
- Begin VB.Image Image1
- Height = 480
- Index = 3
- Left = 120
- Picture = "LCDArray.frx":044E
- Top = 2640
- Width = 480
- End
- Begin VB.Image Image1
- Height = 480
- Index = 2
- Left = 120
- Picture = "LCDArray.frx":0890
- Top = 1860
- Width = 480
- End
- Begin VB.Image Image1
- Height = 480
- Index = 1
- Left = 120
- Picture = "LCDArray.frx":0CD2
- Top = 1140
- Width = 480
- End
- Begin VB.Image Image1
- Height = 480
- Index = 0
- Left = 120
- Picture = "LCDArray.frx":1114
- Top = 300
- Width = 480
- End
- Begin VB.Label Label1
- Alignment = 2 'Center
- Caption = "Washington DC"
- Height = 195
- Left = 780
- TabIndex = 9
- Top = 120
- Width = 1995
- End
- Begin VB.Label Label5
- Alignment = 2 'Center
- Caption = "Mexico City"
- ForeColor = &H00000000&
- Height = 195
- Left = 780
- TabIndex = 7
- Top = 3240
- Width = 1995
- End
- Begin VB.Label Label4
- Alignment = 2 'Center
- Caption = "Tokyo"
- Height = 195
- Left = 780
- TabIndex = 6
- Top = 1680
- Width = 1995
- End
- Begin VB.Label Label3
- Alignment = 2 'Center
- Caption = "Madrid"
- ForeColor = &H00000000&
- Height = 195
- Left = 780
- TabIndex = 5
- Top = 2460
- Width = 1995
- End
- Begin VB.Label Label2
- Alignment = 2 'Center
- Caption = "London"
- ForeColor = &H00000000&
- Height = 195
- Left = 780
- TabIndex = 4
- Top = 900
- Width = 1995
- End
- Attribute VB_Name = "LCDArray"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- Dim moLCD(4) As New CLCD
- Private Sub Form_Load()
- Dim i As Integer
- Screen.MousePointer = vbHourglass
- For i = 0 To 4
- With moLCD(i)
- .Alignment = gnCENTER
- .BackColor = &H800000
- .ForeColor = vbWhite
- Set .Container = picLCD(i)
- End With
- Next i
- moLCD(0).BlinkColon = True
- Timer1_Timer
- Screen.MousePointer = vbDefault
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- Dim i As Integer
- For i = 0 To 4
- Set moLCD(i) = Nothing
- Next i
- Set LCDArray = Nothing
- End Sub
- Private Static Sub Timer1_Timer()
- Dim vTime As Variant
- vTime = Time()
- moLCD(0).Caption = CalcTime(vTime, 0)
- moLCD(1).Caption = CalcTime(vTime, 5)
- moLCD(2).Caption = CalcTime(vTime, 6)
- moLCD(3).Caption = CalcTime(vTime, 14)
- moLCD(4).Caption = CalcTime(vTime, -1)
- End Sub
- Private Function CalcTime(rvTime As Variant, rnHoursDifference As Integer) As String
- CalcTime = Format$(DateAdd("h", rnHoursDifference, rvTime), "h:mm A/P")
- End Function
-